package com.salton123.voice.player;

import android.support.annotation.IntDef;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * User: newSalton@outlook.com
 * Date: 2019/3/8 18:34
 * ModifyTime: 18:34
 * Description:
 */
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.PARAMETER)
@IntDef({
        PlayerState.STATE_ERROR,
        PlayerState.STATE_IDLE,
        PlayerState.STATE_PREPARING,
        PlayerState.STATE_PREPARED,
        PlayerState.STATE_PLAYING,
        PlayerState.STATE_PAUSED,
        PlayerState.STATE_BUFFERING_PLAYING,
        PlayerState.STATE_BUFFERING_PAUSED,
        PlayerState.STATE_STOP,
        PlayerState.STATE_COMPLETED,
        PlayerState.STATE_RELEASE,
})
public @interface PlayerState {
    /**
     * 播放错误
     **/
    int STATE_ERROR = -1;
    /**
     * 播放未开始
     **/
    int STATE_IDLE = 0;
    /**
     * 播放准备中
     **/
    int STATE_PREPARING = 1;
    /**
     * 播放准备就绪
     **/
    int STATE_PREPARED = 2;
    /**
     * 正在播放
     **/
    int STATE_PLAYING = 3;
    /**
     * 暂停播放
     **/
    int STATE_PAUSED = 4;
    /**
     * 正在缓冲(播放器正在播放时，缓冲区数据不足，进行缓冲，缓冲区数据足够后恢复播放)
     **/
    int STATE_BUFFERING_PLAYING = 5;
    /**
     * 正在缓冲(播放器正在播放时，缓冲区数据不足，进行缓冲，此时暂停播放器，继续缓冲，缓冲区数据足够后恢复暂停
     **/
    int STATE_BUFFERING_PAUSED = 6;
    /**
     * 播放停止
     **/
    int STATE_STOP = 7;
    /**
     * 播放完成
     **/
    int STATE_COMPLETED = 8;
    /**
     * 释放播放器
     **/
    int STATE_RELEASE = 9;
}
